Less aggressively poison sources on builds
authorAlex Crichton <alex@alexcrichton.com>
Tue, 3 Apr 2018 18:42:44 +0000 (11:42 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Tue, 3 Apr 2018 21:35:02 +0000 (14:35 -0700)
commit0790db9888cdd160cd2a87414de62266e19c3243
tree709db22e6cd9caa95a7e695ddbb8041ac1ea78d7
parent9bd7134fc5972d8582165ab8e3a6e7d685fc5cc4
Less aggressively poison sources on builds

Discovered in #5257 the changes in #5215 were slightly too aggressively
poisoning sources to require updates, thinking that a manifest changed when it
actually hadn't.

Non-workspace-member path dependencies with optional/dev-dependencies
don't show up in the lock file, so the previous logic would recognize this and
think that the dependency missing from the lock file was just added and would
require a registry update.

The fix in this commit effectively just skips all of these dependencies in
non-workspace members. This means that this will be slightly buggy if an
optional dependency that's activated is added, but that's hopefully something we
can tackle later.

Closes #5257
src/cargo/ops/resolve.rs
tests/testsuite/freshness.rs